#include <bits/stdc++.h>

#define eb emplace_back
#define ep emplace
#define fi first
#define se second
#define in read<int>()
#define lin read<ll>()
#define rep(i, x, y) for(int i = (x); i <= (y); i++)
#define per(i, x, y) for(int i = (x); i >= (y); i--)

using namespace std;

using ll = long long;
using db = double;
using pii = pair < int, int >;
using vec = vector < int >;
using veg = vector < pii >;

template < typename T > T read() {
	T x = 0; bool f = 0; char ch = getchar();
	while(!isdigit(ch)) f |= ch == '-', ch = getchar();
	while(isdigit(ch)) x = x * 10 + (ch ^ 48), ch = getchar();
	return f ? -x : x;
}

template < typename T > void chkmax(T &x, const T &y) { x = x > y ? x : y; }
template < typename T > void chkmin(T &x, const T &y) { x = x < y ? x : y; }

const int N = 2e5 + 10;

int ans[N], n;
unordered_map < int, int > f;

int solve(int l, int r) {
	if(l > r) return l - 1;
	cout << "? " << l << " " << r << endl;
	int a, t; cin >> a >> t;
	if(f.count(a)) {
		int p1 = r - t + 1, p2 = r - t + f[a];
		rep(i, p1, p2) ans[i] = a; f.erase(a);
		solve(l, p1 - 1); return p2;
	} else {
		f[a] = t; int cur = l;
		while(f.count(a)) cur = solve(cur, cur + t - 1) + 1;
		return solve(cur, r);
	}
}

int main() {
	cin >> n;
	solve(1, n);
	cout << "!"; rep(i, 1, n) cout << " " << ans[i];
	cout << endl;
	return 0;
}
